package com.example.demo1010.demo1;

public class Circle implements Measurement{
    int r;

    public Circle(int r) {
        this.r = r;
    }
    @Override
    public double area() {
        System.out.println("圆的面积为" + 3.14 * r * r);
        return Math.PI * r * r;
    }
    @Override
    public double perimeter() {
        System.out.println("圆的周长为" + 3.14 * 2 * r);
        return 3.14 * 2 * r;
    }

}
